﻿package frEngine.primitives
{
    import baseEngine.basic.*;
    import baseEngine.core.*;
    import frEngine.primitives.base.*;

    public class Dummy extends LineBase
    {
        private var _size:Number;
        private var _color:uint;
        private var _thickness:Number;
        private var _alpha:Number;

        public function Dummy(param1:String = "dummy")
        {
            super(param1, false, null);
            return;
        }// end function

        public function reinit(param1:Number = 10, param2:Number = 1, param3:uint = 16777215, param4:Number = 1, param5:RenderList = null) : void
        {
            this.renderList = param5;
            this._thickness = param2;
            this._color = param3;
            this._alpha = param4;
            this._size = param1;
            this.config();
            return;
        }// end function

        private function config() : void
        {
            var _loc_1:* = this._size * 0.5;
            drawInstance.clear();
            drawInstance.lineStyle(this._thickness, this._color, this._alpha);
            drawInstance.moveTo(-_loc_1, -_loc_1, -_loc_1);
            drawInstance.lineTo(_loc_1, -_loc_1, -_loc_1);
            drawInstance.lineTo(_loc_1, _loc_1, -_loc_1);
            drawInstance.lineTo(-_loc_1, _loc_1, -_loc_1);
            drawInstance.lineTo(-_loc_1, -_loc_1, -_loc_1);
            drawInstance.moveTo(-_loc_1, -_loc_1, _loc_1);
            drawInstance.lineTo(_loc_1, -_loc_1, _loc_1);
            drawInstance.lineTo(_loc_1, _loc_1, _loc_1);
            drawInstance.lineTo(-_loc_1, _loc_1, _loc_1);
            drawInstance.lineTo(-_loc_1, -_loc_1, _loc_1);
            drawInstance.moveTo(-_loc_1, -_loc_1, -_loc_1);
            drawInstance.lineTo(-_loc_1, -_loc_1, _loc_1);
            drawInstance.moveTo(_loc_1, -_loc_1, -_loc_1);
            drawInstance.lineTo(_loc_1, -_loc_1, _loc_1);
            drawInstance.moveTo(-_loc_1, _loc_1, -_loc_1);
            drawInstance.lineTo(-_loc_1, _loc_1, _loc_1);
            drawInstance.moveTo(_loc_1, _loc_1, -_loc_1);
            drawInstance.lineTo(_loc_1, _loc_1, _loc_1);
            bounds = new Boundings3D();
            bounds.min.setTo(-_loc_1, -_loc_1, -_loc_1);
            bounds.max.setTo(_loc_1, _loc_1, _loc_1);
            bounds.length = bounds.max.subtract(bounds.min);
            bounds.radius = bounds.max.length;
            return;
        }// end function

        public function get color() : uint
        {
            return this._color;
        }// end function

        public function get size() : Number
        {
            return this._size;
        }// end function

    }
}
